﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BbsbWebService.Classes;

namespace BbsbWebService.Repositories
{
    public abstract class GroupRepositoryBase
    {
        public abstract void Initialise();

        public List<Group> Groups = new List<Group>();

        public abstract void SaveGroup(Group group);

        public abstract void RemoveGroup(Group group);

        public bool HasGroup(Guid id)
        {
            return Groups.Any(o => o.Id == id);
        }

        public Group GetGroup(Guid id)
        {
            return Groups.Single(o => o.Id == id);
        }
    }
}
